﻿using Practice.PH4_2104A.DAL;
using Practice.PH4_2104A.IRepository;
using Practice.PH4_2104A.Shopping.SevenLayerFramework.Domin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Practice.PH4_2104A.Repository
{
    public class SPURepository : ISPURepository
    {
        MyDbContext _context;

        public SPURepository(MyDbContext context)
        {
            _context = context;
        }

        public IQueryable<SPUModel> GetAll()
        {
            return _context.SPUs;
        }

        public void Insert(SPUModel model)
        {
            _context.SPUs.Add(model);
        }
    }
}
